/**
 * 
 */
package prv.pursuivant.config.impl;

import java.util.List;

import prv.pursuivant.config.CategoryDesc;
import prv.pursuivant.config.Config;
import prv.pursuivant.config.ImporterDesc;
import prv.pursuivant.core.Toon;
import prv.pursuivant.core.impl.ToonImpl;

import com.google.inject.AbstractModule;
import com.google.inject.TypeLiteral;
import com.google.inject.internal.Lists;

final class ConfigTestModule extends AbstractModule {
	@Override
	protected void configure() {
		bind(Config.class).to(ConfigImpl.class);
		bind(ImporterDesc.class).toInstance(
				new ImporterDescImpl("eu", "Shadowsong", "cache", 60));
		bind(CategoryDesc.class).toInstance(
				new CategoryDescImpl(CategoryDesc.DUNGEONS_AND_RAIDS));
		bindActiveAchievements();
		bindToons();
	}

	private void bindActiveAchievements() {
		// crappy, crappy, crappy
		TypeLiteral<List<String>> listOfString = new TypeLiteral<List<String>>() {
		};
		bind(listOfString).toInstance(Lists.newArrayList("2137", "2138"));
	}

	private void bindToons() {
		// crappy, crappy, crappy
		TypeLiteral<List<Toon>> listOfToon = new TypeLiteral<List<Toon>>() {
		};
		bind(listOfToon).toInstance(
				Lists.newArrayList((Toon) new ToonImpl("Kwinto", 3)));
	}
}